﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Web.ClientServices.Providers;

namespace AscentDesktop
{
    public partial class LoginForm : Form, IClientFormsAuthenticationCredentialsProvider
    {
        public LoginForm()
        {
            InitializeComponent();
        }

        public ClientFormsAuthenticationCredentials GetCredentials()
        {
            if (this.ShowDialog() == DialogResult.OK)
            {
                return new ClientFormsAuthenticationCredentials(
                    usernameTextBox.Text, passwordTextBox.Text,
                    rememberMeCheckBox.Checked);
            }
            else
            {
                return null;
            }

        }

        private void CloseForm(object sender, System.EventArgs e)
        {
            this.Close();
        }
    }
}
